function request (parmas) {
  return new Promise((resolve, reject) => {
    wx.request({
      ...parmas,
      success: (result) => {
        resolve(result.data)
      },
      fail: (err) => {
        reject(err)
      },
      complete: () => {}
    }) 
  })
}

export default request